import objectToQueryString from '../utils/objecToQuery.js'
import request from './index.js'
// 获取轮播图
export function getCarousels() {
	return request.get({
		url: `/setting/carousel`,
		data: {
			status: 'active'
		}
	})
}

// 获取社团
export function getAllClubs(limit, offset, status) {
  const query = objectToQueryString({limit, offset, status})
  return request.get({
    url: `/clubs?${query}`,
  }) 
}

// 获取帖子

// 获取和模糊查询全部帖子帖子
export function getPosts(queryInfo) {
	const query = objectToQueryString(queryInfo)
  return request.get({
    url: `/posts?${query}`,
  })
}